<template>
  <div class="page-sheet cover" :class="en ? 'en' : ''">
    <img class="company_logo" src="/assets/logo.png" />
    <div class="file_no_version">
      <span class="file_no">{{ doc.standardNo }}</span
      >版本：<span class="file_version">{{ doc.standardVersion }}</span>
    </div>
    <div class="secret_classify">
      密级<span v-if="en" class="secret_classify_en">(SECURITY CLASSIFICATION)</span>：{{ doc.secretLevel }}
    </div>
    <div class="file_type_wrapper">
      <div class="file_type_zh">{{ doc.classification }}</div>
      <div class="file_type_en" v-if="en">{{ doc.classificationEn }}</div>
    </div>
    <hr class="file_type_bottom_line" :style="{ top: en ? '73mm' : '' }" />
    <div class="file_name">
      <div class="file_name_zh">{{ doc.firstName }}</div>
      <div class="file_name_zh" v-if="doc.secondName">{{ doc.secondName }}</div>
      <div class="file_name_zh" v-if="doc.thirdName">{{ doc.thirdName }}</div>
      <div class="file_name_en" v-if="en && doc.firstEnglishName">{{ doc.firstEnglishName }}</div>
      <div class="file_name_en" v-if="en && doc.secondEnglishName">{{ doc.secondEnglishName }}</div>
      <div class="file_name_en" v-if="en && doc.thirdEnglishName">{{ doc.thirdEnglishName }}</div>
      <div class="file_name_en" v-if="en && doc.fourEnglishName">{{ doc.fourEnglishName }}</div>
      <div class="file_name_en" v-if="en && doc.fiveEnglishName">{{ doc.fiveEnglishName }}</div>
    </div>
    <div class="cover_date">
      <div class="publish_date">{{ doc.publishDate }} 发布<span v-if="en" class="publish_date_en">(ISSUED)</span></div>
      <div class="implement_date">
        {{ doc.implementationDate }} 实施<span v-if="en" class="implement_date_en">(IMPLEMENTED)</span>
      </div>
    </div>
    <div class="edit_unit">
      <div class="edit_unit_zh">{{ doc.compileUnit }}</div>
      <div class="edit_unit_en" v-if="en">{{ doc.compileUnitEn || '' }}</div>
    </div>

    <PageFooter />
  </div>
</template>
<script>
import { mapGetters } from 'vuex'
import PageFooter from '../PageFooter.vue'

export default {
  components: {
    PageFooter
  },
  computed: {
    ...mapGetters(['languageType']),
    en() {
      return this.languageType === 'both'
    },
    doc() {
      return this.$store.state.xmleditor.standardBaseInfo
    }
  }
}
</script>
